
package combat.example.protocol.interfaces;

import java.io.Serializable;
import java.util.ArrayList;

import combat.example.protocol.data.DoublePoint;
import combat.example.protocol.data.Order;
import combat.example.protocol.data.PhysicalObject;
import combat.example.protocol.types.VehicleType;
import combat.example.server.protocol.implementation.OnboardSystem;


/**
 * 
 * @author Laurens Andriessen
 * @version 1.0
 */
public interface VehicleInt extends PhysicalObjectInt, Serializable {

	double fuel = 0.0;
	public double getFuel();
	public void setFuel(double fuel);

	int health = 100;
	public int getHealth();
	public void setHealth(int health);

	Boolean locked = true;
	public Boolean getLocked();
	public void setLocked(Boolean locked);
	// Helpers
	public void lock(); // setLocked(true);
	public void unlock(); // setLocked(false);

	ArrayList<OnboardSystem> onboardSystems = null;
	public ArrayList<OnboardSystem> getOnboardSystems();
	public void setOnboardSystems(ArrayList<OnboardSystem> onboardSystems);

	ArrayList<Order> orders = null;
	public ArrayList<Order> getOrders();
	public void setOrders(ArrayList<Order> orders);

	VehicleType vehicleType = VehicleType.UNKNOWN;
	public VehicleType getVehicleType();
	public void setVehicleType(VehicleType vehicleType);

	// ------------------------------------------

	public void orderMove(DoublePoint position); // Creates new move order
	public void orderAttack(DoublePoint position); // Creates new attack order
	public void orderCancel(int orderID); // Cancels existing order

	// Sub-interface FrigateInt
	interface FrigateInt extends VehicleInt {

		public void fireUnguidedMissile(DoublePoint target);
		public void fireGuidedMissile(PhysicalObject target);
		public void fireTorpedo(DoublePoint target);
		public void fireGoalkeeper(DoublePoint target);
	}

	// Sub-interface SubmarineInt
	interface SubmarineInt extends VehicleInt {

		public void fireTorpedo(DoublePoint target);
	}

	// Sub-interface ConvoyInt
	interface ConvoyInt extends VehicleInt {}
}
